import { defineStore } from 'pinia'
import { sourceHeader } from '@/utils/plugins'

const friendsStore = defineStore('friendsStore', {
  state: () => {
    return {
        // 朋友相册列表
        photoAlbumList: [
          {
            id: '1',
            title: '*剑专区',
            falseName: '*剑',
            answer: '王',
            path: '',
          },
          {
              id: '2',
              title: '**昕专区',
              falseName: '**昕',
              answer: '刘',
              path: '',
          },
          {
              id: '3',
              title: '**翀专区',
              falseName: '**翀',
              answer: '刘',
              path: '',
          },
          {
              id: '4',
              title: '*昊专区',
              falseName: '*昊',
              answer: '黎',
              path: '',
          },
          {
              id: '5',
              title: '*永*专区',
              falseName: '**帅',
              answer: '刘',
              path: '',
          },
          {
              id: '6',
              title: '*松*专区',
              falseName: '**明',
              answer: '李',
              path: '',
          },
        ],
        // 所有朋友相册详情列表
        allFriendsPhotoList: [
          {
            id: '1',
            title: '*剑专区',
            imgList: [
                {
                    type: 'local', // local:本地图片
                    img: 'friends/wj/1.jpg',
                },
                {
                    type: 'online', // online:在线图片
                    // img: 'http://101.200.90.7/image/wj/1.jpg',
                    // img: 'https://www.paperfrogwei.com/image/wj/1.jpg',
                    img: sourceHeader() + '/image/wj/1.jpg',
                },
                {
                    type: 'online', // online:在线图片
                    // img: 'http://101.200.90.7/image/wj/2.jpg',
                    img: sourceHeader() + '/image/wj/2.jpg',
                },
                {
                    type: 'video',
                    img: sourceHeader() + '/image/wj/1.mp4',
                },
                {
                    type: 'online',
                    img: sourceHeader() + '/image/wj/3.jpg',
                },
                {
                    type: 'online',
                    img: sourceHeader() + '/image/wj/4.jpg',
                },
            ]
          },
          {
              id: '2',
              title: '**昕专区',
              imgList: [
                  {
                      type: 'local',
                      img: 'friends/ljx/1.jpg',
                  },
                  {
                      type: 'online',
                      img: sourceHeader() + '/image/ljx/1.jpg',
                  },
                  {
                      type: 'video',
                      img: sourceHeader() + '/image/ljx/1.MP4',
                  },
                  {
                    type: 'online',
                    img: sourceHeader() + '/image/ljx/2.jpg',
                },
              ]
          },
          {
              id: '3',
              title: '**翀专区',
              imgList: [
                  {
                      type: 'local',
                      img: 'friends/ljc/1.jpg',
                  },
              ]
          },
          {
              id: '4',
              title: '*昊专区',
              imgList: [
                  {
                      type: 'local',
                      img: 'friends/lh/1.jpg',
                  },
                  {
                      type: 'online',
                      img: sourceHeader() + '/image/lh/1.jpg',
                  },
                  {
                      type: 'online',
                      img: sourceHeader() + '/image/lh/2.jpg',
                  },
                  {
                     type: 'video',
                     img: sourceHeader() + '/image/lh/1.mp4',
                   },
                   {
                     type: 'online',
                     img: sourceHeader() + '/image/lh/3.jpg',
                   },
              ]
          },
          {
              id: '5',
              title: '*永*专区',
              imgList: [
                  {
                      type: 'local',
                      img: 'friends/lys/1.jpg',
                  },
                  {
                      type: 'online',
                      img: sourceHeader() + '/image/lys/1.jpg',
                  },
              ]
          },
          {
              id: '6',
              title: '*松*专区',
              imgList: [
                  {
                      type: 'online',
                      img: sourceHeader() + '/image/lsm/1.jpg',
                  },
                  {
                      type: 'online',
                      img: sourceHeader() + '/image/lsm/2.jpg',
                  },
                  {
                      type: 'video',
                      img: sourceHeader() + '/image/lsm/1.MP4',
                  },
                  {
                    type: 'online',
                    img: sourceHeader() + '/image/lsm/3.jpg',
                },
              ]
          },
        ],
        checkPhotoAlbumNameItem: {}, // 朋友列表中当前选中的项
    }
  },
  actions: {
    handlerSetCheckPhotoAlbumNameItem(val: any) { // 设置朋友列表中当前选中的项
      this.checkPhotoAlbumNameItem = val
    }
  }
})

export default friendsStore